﻿@*
	Iván Loire - www.iloire.com
	Please readme README file for license terms.

	ASP.NET MVC3 ACME Invocing app (demo app for training purposes)
*@

@model IEnumerable<PurchaseType>

@{
    ViewBag.Title = "List of Expense Types";
}

<h1>List <small>of Expense Types</small></h1>

<p>
    @Html.ActionLink("[+] Create New", "Create", null, new {@class="btn primary"})
</p>
<table class="zebra-striped">
    <thead>
        <th>
            Name
        </th>
        <th>
            Descr
        </th>
        <th width="150"></th>
    </thead>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Descr)
        </td>
        <td nowrap>
            @Html.ActionLink("Edit", "Edit", new { id=item.PurchaseTypeID }, new { @class = "btn primary"}) 
            @Html.ActionLink("Delete", "Delete", new { id=item.PurchaseTypeID }, new { @class = "btn"})
        </td>
    </tr>
}

</table>
<script>
	$(document).ready(function() {
		$("table.zebra-striped").tablesorter({ sortList: [[1,0]] });
	});
</script>

